(function(e){"use strict";var n=Object.keys;var t=Array.isArray;var r=typeof self!=="undefined"?self:typeof window!=="undefined"?window:global;function i(e,t){if(babelHelpers["typeof"](t)!=="object")return e;n(t).forEach((function(n){e[n]=t[n]}));return e}var o=Object.getPrototypeOf;var u={}.hasOwnProperty;function a(e,n){return u.call(e,n)}function s(e,t){if(typeof t==="function")t=t(o(e));if(babelHelpers["typeof"](t)!=="object")return;n(t).forEach((function(n){f(e,n,t[n])}))}var c=Object.defineProperty;function f(e,n,t,r){c(e,n,i(t&&a(t,"get")&&typeof t.get==="function"?{get:t.get,set:t.set,configurable:true}:{value:t,configurable:true,writable:true},r))}function l(e){return{from:function n(t){e.prototype=Object.create(t.prototype);f(e.prototype,"constructor",e);return{extend:s.bind(null,e.prototype)}}}}var h=Object.getOwnPropertyDescriptor;function d(e,n){var t=h(e,n),r;return t||(r=o(e))&&d(r,n)}var v=[].slice;function p(e,n,t){return v.call(e,n,t)}function y(e,n){return n(e)}function m(e){if(!e)throw new Error("Assertion Failed")}function g(e){if(r.setImmediate)setImmediate(e);else setTimeout(e,0)}function b(e,n){return e.reduce((function(e,t,r){var i=n(t,r);if(i)e[i[0]]=i[1];return e}),{})}function w(e,n){return function(){try{e.apply(this,arguments)}catch(e){n(e)}}}function _(e,n,t){try{e.apply(null,t)}catch(e){n&&n(e)}}function k(e,n){if(a(e,n))return e[n];if(!n)return e;if(typeof n!=="string"){var t=[];for(var r=0,i=n.length;r<i;++r){var o=k(e,n[r]);t.push(o)}return t}var u=n.indexOf(".");if(u!==-1){var s=e[n.substr(0,u)];return s===undefined?undefined:k(s,n.substr(u+1))}return undefined}function x(e,n,t){if(!e||n===undefined)return;if("isFrozen"in Object&&Object.isFrozen(e))return;if(typeof n!=="string"&&"length"in n){m(typeof t!=="string"&&"length"in t);for(var r=0,i=n.length;r<i;++r){x(e,n[r],t[r])}}else{var o=n.indexOf(".");if(o!==-1){var u=n.substr(0,o);var a=n.substr(o+1);if(a===""){if(t===undefined)delete e[u];else e[u]=t}else{var s=e[u];if(!s)s=e[u]={};x(s,a,t)}}else{if(t===undefined)delete e[n];else e[n]=t}}}function P(e,n){if(typeof n==="string")x(e,n,undefined);else if("length"in n)[].map.call(n,(function(n){x(e,n,undefined)}))}function j(e){var n={};for(var t in e){if(a(e,t))n[t]=e[t]}return n}var E=[].concat;function S(e){return E.apply([],e)}var O="Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(S([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(n){return n+e+"Array"}))})))).filter((function(e){return r[e]})).map((function(e){return r[e]}));function A(e){if(!e||babelHelpers["typeof"](e)!=="object")return e;var n;if(t(e)){n=[];for(var r=0,i=e.length;r<i;++r){n.push(A(e[r]))}}else if(O.indexOf(e.constructor)>=0){n=e}else{n=e.constructor?Object.create(e.constructor.prototype):{};for(var o in e){if(a(e,o)){n[o]=A(e[o])}}}return n}function I(e,t,r,i){r=r||{};i=i||"";n(e).forEach((function(n){if(!a(t,n))r[i+n]=undefined;else{var o=e[n],u=t[n];if(babelHelpers["typeof"](o)==="object"&&babelHelpers["typeof"](u)==="object"&&o&&u&&""+o.constructor===""+u.constructor)I(o,u,r,i+n+".");else if(o!==u)r[i+n]=t[n]}}));n(t).forEach((function(n){if(!a(e,n)){r[i+n]=t[n]}}));return r}var D=typeof Symbol!=="undefined"&&Symbol.iterator;var C=D?function(e){var n;return e!=null&&(n=e[D])&&n.apply(e)}:function(){return null};var K={};function T(e){var n,r,i,o;if(arguments.length===1){if(t(e))return e.slice();if(this===K&&typeof e==="string")return[e];if(o=C(e)){r=[];while(i=o.next(),!i.done){r.push(i.value)}return r}if(e==null)return[e];n=e.length;if(typeof n==="number"){r=new Array(n);while(n--){r[n]=e[n]}return r}return[e]}n=arguments.length;r=new Array(n);while(n--){r[n]=arguments[n]}return r}var B=typeof location!=="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function F(e,n){B=e;M=n}var M=function e(){return true};var N=!new Error("").stack;function q(){if(N)try{throw new Error}catch(e){return e}return new Error}function R(e,n){var t=e.stack;if(!t)return"";n=n||0;if(t.indexOf(e.name)===0)n+=(e.name+e.message).split("\n").length;return t.split("\n").slice(n).filter(M).map((function(e){return"\n"+e})).join("")}function U(e,n){return function(){console.warn(e+" is deprecated. See https://github.com/dfahlander/Dexie.js/wiki/Deprecations. "+R(q(),1));return n.apply(this,arguments)}}var H=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"];var V=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"];var z=H.concat(V);var L={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed"};function W(e,n){this._e=q();this.name=e;this.message=n}l(W).from(Error).extend({stack:{get:function e(){return this._stack||(this._stack=this.name+": "+this.message+R(this._e,2))}},toString:function e(){return this.name+": "+this.message}});function Q(e,n){return e+". Errors: "+n.map((function(e){return e.toString()})).filter((function(e,n,t){return t.indexOf(e)===n})).join("\n")}function G(e,n,t,r){this._e=q();this.failures=n;this.failedKeys=r;this.successCount=t}l(G).from(W);function J(e,n){this._e=q();this.name="BulkError";this.failures=n;this.message=Q(e,n)}l(J).from(W);var X=z.reduce((function(e,n){return e[n]=n+"Error",e}),{});var Y=W;var $=z.reduce((function(e,n){var t=n+"Error";function r(e,r){this._e=q();this.name=t;if(!e){this.message=L[n]||t;this.inner=null}else if(typeof e==="string"){this.message=e;this.inner=r||null}else if(babelHelpers["typeof"](e)==="object"){this.message=e.name+" "+e.message;this.inner=e}}l(r).from(Y);e[n]=r;return e}),{});$.Syntax=SyntaxError;$.Type=TypeError;$.Range=RangeError;var Z=V.reduce((function(e,n){e[n+"Error"]=$[n];return e}),{});function ee(e,n){if(!e||e instanceof W||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Z[e.name])return e;var t=new Z[e.name](n||e.message,e);if("stack"in e){f(t,"stack",{get:function e(){return this.inner.stack}})}return t}var ne=z.reduce((function(e,n){if(["Syntax","Type","Range"].indexOf(n)===-1)e[n+"Error"]=$[n];return e}),{});ne.ModifyError=G;ne.DexieError=W;ne.BulkError=J;function te(){}function re(e){return e}function ie(e,n){if(e==null||e===re)return n;return function(t){return n(e(t))}}function oe(e,n){return function(){e.apply(this,arguments);n.apply(this,arguments)}}function ue(e,n){if(e===te)return n;return function(){var t=e.apply(this,arguments);if(t!==undefined)arguments[0]=t;var r=this.onsuccess,i=this.onerror;this.onsuccess=null;this.onerror=null;var o=n.apply(this,arguments);if(r)this.onsuccess=this.onsuccess?oe(r,this.onsuccess):r;if(i)this.onerror=this.onerror?oe(i,this.onerror):i;return o!==undefined?o:t}}function ae(e,n){if(e===te)return n;return function(){e.apply(this,arguments);var t=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null;n.apply(this,arguments);if(t)this.onsuccess=this.onsuccess?oe(t,this.onsuccess):t;if(r)this.onerror=this.onerror?oe(r,this.onerror):r}}function se(e,n){if(e===te)return n;return function(t){var r=e.apply(this,arguments);i(t,r);var o=this.onsuccess,u=this.onerror;this.onsuccess=null;this.onerror=null;var a=n.apply(this,arguments);if(o)this.onsuccess=this.onsuccess?oe(o,this.onsuccess):o;if(u)this.onerror=this.onerror?oe(u,this.onerror):u;return r===undefined?a===undefined?undefined:a:i(r,a)}}function ce(e,n){if(e===te)return n;return function(){if(n.apply(this,arguments)===false)return false;return e.apply(this,arguments)}}function fe(e,n){if(e===te)return n;return function(){var t=e.apply(this,arguments);if(t&&typeof t.then==="function"){var r=this,i=arguments.length,o=new Array(i);while(i--){o[i]=arguments[i]}return t.then((function(){return n.apply(r,o)}))}return n.apply(this,arguments)}}var le={};var he=100;var de=20;var ve=7;var pe=function(){try{return new Function("let F=async ()=>{},p=F();return [p,Object.getPrototypeOf(p),Promise.resolve(),F.constructor];")()}catch(n){var e=r.Promise;return e?[e.resolve(),e.prototype,e.resolve()]:[]}}();var ye=pe[0];var me=pe[1];var ge=pe[2];var be=me&&me.then;var we=ye&&ye.constructor;var _e=pe[3];var ke=!!ge;var xe=false;var Pe=ge?function(){ge.then(Qe)}:r.setImmediate?setImmediate.bind(null,Qe):r.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){Qe();e=null})).observe(e,{attributes:true});e.setAttribute("i","1")}:function(){setTimeout(Qe,0)};var je=function e(n,t){Te.push([n,t]);if(Se){Pe();Se=false}};var Ee=true;var Se=true;var Oe=[];var Ae=[];var Ie=null;var De=re;var Ce={id:"global",global:true,ref:0,unhandleds:[],onunhandled:kn,pgp:false,env:{},finalize:function e(){this.unhandleds.forEach((function(e){try{kn(e[0],e[1])}catch(e){}}))}};var Ke=Ce;var Te=[];var Be=0;var Fe=[];function Me(e){if(babelHelpers["typeof"](this)!=="object")throw new TypeError("Promises must be constructed via new");this._listeners=[];this.onuncatched=te;this._lib=false;var n=this._PSD=Ke;if(B){this._stackHolder=q();this._prev=null;this._numPrev=0}if(typeof e!=="function"){if(e!==le)throw new TypeError("Not a function");this._state=arguments[1];this._value=arguments[2];if(this._state===false)Ue(this,this._value);return}this._state=null;this._value=null;++n.ref;Re(this,e)}var Ne={get:function e(){var n=Ke,t=an;function r(e,r){var i=this;var o=!n.global&&(n!==Ke||t!==an);if(o)ln();var u=new Me((function(t,u){Ve(i,new qe(bn(e,n,o),bn(r,n,o),t,u,n))}));B&&We(u,this);return u}r.prototype=le;return r},set:function e(n){f(this,"then",n&&n.prototype===le?Ne:{get:function e(){return n},set:Ne.set})}};s(Me.prototype,{then:Ne,_then:function e(n,t){Ve(this,new qe(null,null,n,t,Ke))},catch:function e(n){if(arguments.length===1)return this.then(null,n);var t=arguments[0],r=arguments[1];return typeof t==="function"?this.then(null,(function(e){return e instanceof t?r(e):en(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):en(e)}))},finally:function e(n){return this.then((function(e){n();return e}),(function(e){n();return en(e)}))},stack:{get:function e(){if(this._stack)return this._stack;try{xe=true;var n=Le(this,[],de);var t=n.join("\nFrom previous: ");if(this._state!==null)this._stack=t;return t}finally{xe=false}}},timeout:function e(n,t){var r=this;return n<Infinity?new Me((function(e,i){var o=setTimeout((function(){return i(new $.Timeout(t))}),n);r.then(e,i)["finally"](clearTimeout.bind(null,o))})):this}});if(typeof Symbol!=="undefined"&&Symbol.toStringTag)f(Me.prototype,Symbol.toStringTag,"Promise");Ce.env=yn();function qe(e,n,t,r,i){this.onFulfilled=typeof e==="function"?e:null;this.onRejected=typeof n==="function"?n:null;this.resolve=t;this.reject=r;this.psd=i}s(Me,{all:function e(){var n=T.apply(null,arguments).map(hn);return new Me((function(e,t){if(n.length===0)e([]);var r=n.length;n.forEach((function(i,o){return Me.resolve(i).then((function(t){n[o]=t;if(!--r)e(n)}),t)}))}))},resolve:function e(n){if(n instanceof Me)return n;if(n&&typeof n.then==="function")return new Me((function(e,t){n.then(e,t)}));var t=new Me(le,true,n);We(t,Ie);return t},reject:en,race:function e(){var n=T.apply(null,arguments).map(hn);return new Me((function(e,t){n.map((function(n){return Me.resolve(n).then(e,t)}))}))},PSD:{get:function e(){return Ke},set:function e(n){return Ke=n}},newPSD:cn,usePSD:mn,scheduler:{get:function e(){return je},set:function e(n){je=n}},rejectionMapper:{get:function e(){return De},set:function e(n){De=n}},follow:function e(n,t){return new Me((function(e,r){return cn((function(e,t){var r=Ke;r.unhandleds=[];r.onunhandled=t;r.finalize=oe((function(){var n=this;Ye((function(){n.unhandleds.length===0?e():t(n.unhandleds[0])}))}),r.finalize);n()}),t,e,r)}))}});function Re(e,n){try{n((function(n){if(e._state!==null)return;if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var t=e._lib&&Ge();if(n&&typeof n.then==="function"){Re(e,(function(e,t){n instanceof Me?n._then(e,t):n.then(e,t)}))}else{e._state=true;e._value=n;He(e)}if(t)Je()}),Ue.bind(null,e))}catch(n){Ue(e,n)}}function Ue(e,n){Ae.push(n);if(!e||e._state!==null)return;var t=e._lib&&Ge();n=De(n);e._state=false;e._value=n;B&&n!==null&&babelHelpers["typeof"](n)==="object"&&!n._promise&&_((function(){var t=d(n,"stack");n._promise=e;f(n,"stack",{get:function r(){return xe?t&&(t.get?t.get.apply(n):t.value):e.stack}})}));$e(e);He(e);if(t)Je()}function He(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t<r;++t){Ve(e,n[t])}var i=e._PSD;--i.ref||i.finalize();if(Be===0){++Be;je((function(){if(--Be===0)Xe()}),[])}}function Ve(e,n){if(e._state===null){e._listeners.push(n);return}var t=e._state?n.onFulfilled:n.onRejected;if(t===null){return(e._state?n.resolve:n.reject)(e._value)}++n.psd.ref;++Be;je(ze,[t,e,n])}function ze(e,n,t){try{Ie=n;var r,i=n._value;if(n._state){r=e(i)}else{if(Ae.length)Ae=[];r=e(i);if(Ae.indexOf(i)===-1)Ze(n)}t.resolve(r)}catch(e){t.reject(e)}finally{Ie=null;if(--Be===0)Xe();--t.psd.ref||t.psd.finalize()}}function Le(e,n,t){if(n.length===t)return n;var r="";if(e._state===false){var i=e._value,o,u;if(i!=null){o=i.name||"Error";u=i.message||i;r=R(i,0)}else{o=i;u=""}n.push(o+(u?": "+u:"")+r)}if(B){r=R(e._stackHolder,2);if(r&&n.indexOf(r)===-1)n.push(r);if(e._prev)Le(e._prev,n,t)}return n}function We(e,n){var t=n?n._numPrev+1:0;if(t<he){e._prev=n;e._numPrev=t}}function Qe(){Ge()&&Je()}function Ge(){var e=Ee;Ee=false;Se=false;return e}function Je(){var e,n,t;do{while(Te.length>0){e=Te;Te=[];t=e.length;for(n=0;n<t;++n){var r=e[n];r[0].apply(null,r[1])}}}while(Te.length>0);Ee=true;Se=true}function Xe(){var e=Oe;Oe=[];e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));var n=Fe.slice(0);var t=n.length;while(t){n[--t]()}}function Ye(e){function n(){e();Fe.splice(Fe.indexOf(n),1)}Fe.push(n);++Be;je((function(){if(--Be===0)Xe()}),[])}function $e(e){if(!Oe.some((function(n){return n._value===e._value})))Oe.push(e)}function Ze(e){var n=Oe.length;while(n){if(Oe[--n]._value===e._value){Oe.splice(n,1);return}}}function en(e){return new Me(le,false,e)}function nn(e,n){var t=Ke;return function(){var r=Ge(),i=Ke;try{pn(t,true);return e.apply(this,arguments)}catch(e){n&&n(e)}finally{pn(i,false);if(r)Je()}}}var tn={awaits:0,echoes:0,id:0};var rn=0;var on=[];var un=0;var an=0;var sn=0;function cn(e,n,t,r){var o=Ke,u=Object.create(o);u.parent=o;u.ref=0;u.global=false;u.id=++sn;var a=Ce.env;u.env=ke?{Promise:Me,PromiseProp:{value:Me,configurable:true,writable:true},all:Me.all,race:Me.race,resolve:Me.resolve,reject:Me.reject,nthen:wn(a.nthen,u),gthen:wn(a.gthen,u)}:{};if(n)i(u,n);++o.ref;u.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=mn(u,e,t,r);if(u.ref===0)u.finalize();return s}function fn(){if(!tn.id)tn.id=++rn;++tn.awaits;tn.echoes+=ve;return tn.id}function ln(e){if(!tn.awaits||e&&e!==tn.id)return;if(--tn.awaits===0)tn.id=0;tn.echoes=tn.awaits*ve}function hn(e){if(tn.echoes&&e&&e.constructor===we){fn();return e.then((function(e){ln();return e}),(function(e){ln();return xn(e)}))}return e}function dn(e){++an;if(!tn.echoes||--tn.echoes===0){tn.echoes=tn.id=0}on.push(Ke);pn(e,true)}function vn(){var e=on[on.length-1];on.pop();pn(e,false)}function pn(e,n){var t=Ke;if(n?tn.echoes&&(!un++||e!==Ke):un&&(!--un||e!==Ke)){gn(n?dn.bind(null,e):vn)}if(e===Ke)return;Ke=e;if(t===Ce)Ce.env=yn();if(ke){var i=Ce.env.Promise;var o=e.env;me.then=o.nthen;i.prototype.then=o.gthen;if(t.global||e.global){Object.defineProperty(r,"Promise",o.PromiseProp);i.all=o.all;i.race=o.race;i.resolve=o.resolve;i.reject=o.reject}}}function yn(){var e=r.Promise||Me;return ke?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(r,"Promise"),all:e.all,race:e.race,resolve:e.resolve,reject:e.reject,nthen:me.then,gthen:e.prototype.then}:{}}function mn(e,n,t,r,i){var o=Ke;try{pn(e,true);return n(t,r,i)}finally{pn(o,false)}}function gn(e){be.call(ye,e)}function bn(e,n,t){return typeof e!=="function"?e:function(){var r=Ke;if(t)fn();pn(n,true);try{return e.apply(this,arguments)}finally{pn(r,false)}}}function wn(e,n){return function(t,r){return e.call(this,bn(t,n,false),bn(r,n,false))}}var _n="unhandledrejection";function kn(e,n){var t;try{t=n.onuncatched(e)}catch(e){}if(t!==false)try{var o,u={promise:n,reason:e};if(r.document&&document.createEvent){o=document.createEvent("Event");o.initEvent(_n,true,true);i(o,u)}else if(r.CustomEvent){o=new CustomEvent(_n,{detail:u});i(o,u)}if(o&&r.dispatchEvent){dispatchEvent(o);if(!r.PromiseRejectionEvent&&r.onunhandledrejection)try{r.onunhandledrejection(o)}catch(e){}}if(!o.defaultPrevented){console.warn("Unhandled rejection: "+(e.stack||e))}}catch(e){}}var xn=Me.reject;function Pn(e){var r={};var i=function n(t,i){if(i){var o=arguments.length,u=new Array(o-1);while(--o){u[o-1]=arguments[o]}r[t].subscribe.apply(null,u);return e}else if(typeof t==="string"){return r[t]}};i.addEventType=a;for(var o=1,u=arguments.length;o<u;++o){a(arguments[o])}return i;function a(e,n,t){if(babelHelpers["typeof"](e)==="object")return s(e);if(!n)n=ce;if(!t)t=te;var o={subscribers:[],fire:t,subscribe:function e(t){if(o.subscribers.indexOf(t)===-1){o.subscribers.push(t);o.fire=n(o.fire,t)}},unsubscribe:function e(r){o.subscribers=o.subscribers.filter((function(e){return e!==r}));o.fire=o.subscribers.reduce(n,t)}};r[e]=i[e]=o;return o}function s(e){n(e).forEach((function(n){var r=e[n];if(t(r)){a(n,e[n][0],e[n][1])}else if(r==="asap"){var i=a(n,re,(function e(){var n=arguments.length,t=new Array(n);while(n--){t[n]=arguments[n]}i.subscribers.forEach((function(e){g((function n(){e.apply(null,t)}))}))}))}else throw new $.InvalidArgument("Invalid event config")}))}}var jn="2.0.4";var En=String.fromCharCode(65535);var Sn=function(){try{IDBKeyRange.only([[]]);return[[]]}catch(e){return En}}();var On=-Infinity;var An="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";var In="String expected.";var Dn=[];var Cn=typeof navigator!=="undefined"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent);var Kn=Cn;var Tn=Cn;var Bn=function e(n){return!/(dexie\.js|dexie\.min\.js)/.test(n)};var Fn;F(B,Bn);function Mn(e,o){var u=Mn.dependencies;var c=i({addons:Mn.addons,autoOpen:true,indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},o);var l=c.addons,h=c.autoOpen,d=c.indexedDB,v=c.IDBKeyRange;var g=this._dbSchema={};var P=[];var E=[];var O={};var D=null;var C=null;var F=false;var M=null;var N=false;var R="readonly",H="readwrite";var V=this;var z,L=new Me((function(e){z=e})),W,Q=new Me((function(e,n){W=n}));var X=true;var Y=!!Jn(d),Z;function ee(){V.on("versionchange",(function(e){if(e.newVersion>0)console.warn("Another connection wants to upgrade database '"+V.name+"'. Closing db now to resume the upgrade.");else console.warn("Another connection wants to delete database '"+V.name+"'. Closing db now to resume the delete request.");V.close()}));V.on("blocked",(function(e){if(!e.newVersion||e.newVersion<e.oldVersion)console.warn("Dexie.delete('"+V.name+"') was blocked");else console.warn("Upgrade '"+V.name+"' blocked by other connection holding version "+e.oldVersion/10)}))}this.version=function(e){if(D||F)throw new $.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var n=P.filter((function(n){return n._cfg.version===e}))[0];if(n)return n;n=new ne(e);P.push(n);P.sort(Se);X=false;return n};function ne(e){this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null};this.stores({})}i(ne.prototype,{stores:function e(t){this._cfg.storesSource=this._cfg.storesSource?i(this._cfg.storesSource,t):t;var r={};P.forEach((function(e){i(r,e._cfg.storesSource)}));var o=this._cfg.dbschema={};this._parseStoresSpec(r,o);g=V._dbSchema=o;Ae([O,V,xe.prototype]);Oe([O,V,xe.prototype,this._cfg.tables],n(o),o);E=n(o);return this},upgrade:function e(n){this._cfg.contentUpgrade=n;return this},_parseStoresSpec:function e(t,r){n(t).forEach((function(e){if(t[e]!==null){var n={};var i=De(t[e]);var o=i.shift();if(o.multi)throw new $.Schema("Primary key cannot be multi-valued");if(o.keyPath)x(n,o.keyPath,o.auto?0:o.keyPath);i.forEach((function(e){if(e.auto)throw new $.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new $.Schema("Index must have a name and cannot be an empty string");x(n,e.keyPath,e.compound?e.keyPath.map((function(){return""})):"")}));r[e]=new Qn(e,o,i,n)}}))}});function oe(e,t,r){var i=V._createTransaction(H,E,g);i.create(t);i._completion["catch"](r);var o=i._reject.bind(i);cn((function(){Ke.trans=i;if(e===0){n(g).forEach((function(e){he(t,e,g[e].primKey,g[e].indexes)}));Me.follow((function(){return V.on.populate.fire(i)}))["catch"](o)}else ce(e,i,t)["catch"](o)}))}function ce(e,n,t){var r=[];var i=P.filter((function(n){return n._cfg.version===e}))[0];if(!i)throw new $.Upgrade("Dexie specification of currently installed DB version is missing");g=V._dbSchema=i._cfg.dbschema;var o=false;var u=P.filter((function(n){return n._cfg.version>e}));u.forEach((function(e){r.push((function(){var r=g;var i=e._cfg.dbschema;Ve(r,t);Ve(i,t);g=V._dbSchema=i;var u=le(r,i);u.add.forEach((function(e){he(t,e[0],e[1].primKey,e[1].indexes)}));u.change.forEach((function(e){if(e.recreate){throw new $.Upgrade("Not yet support for changing primary key")}else{var n=t.objectStore(e.name);e.add.forEach((function(e){pe(n,e)}));e.change.forEach((function(e){n.deleteIndex(e.name);pe(n,e)}));e.del.forEach((function(e){n.deleteIndex(e)}))}}));if(e._cfg.contentUpgrade){o=true;return Me.follow((function(){e._cfg.contentUpgrade(n)}))}}));r.push((function(n){if(!o||!Kn){var t=e._cfg.dbschema;ve(t,n)}}))}));function a(){return r.length?Me.resolve(r.shift()(n.idbtrans)).then(a):Me.resolve()}return a().then((function(){de(g,t)}))}function le(e,n){var t={del:[],add:[],change:[]};for(var r in e){if(!n[r])t.del.push(r)}for(r in n){var i=e[r],o=n[r];if(!i){t.add.push([r,o])}else{var u={name:r,def:o,recreate:false,del:[],add:[],change:[]};if(i.primKey.src!==o.primKey.src){u.recreate=true;t.change.push(u)}else{var a=i.idxByName;var s=o.idxByName;for(var c in a){if(!s[c])u.del.push(c)}for(c in s){var f=a[c],l=s[c];if(!f)u.add.push(l);else if(f.src!==l.src)u.change.push(l)}if(u.del.length>0||u.add.length>0||u.change.length>0){t.change.push(u)}}}}return t}function he(e,n,t,r){var i=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});r.forEach((function(e){pe(i,e)}));return i}function de(e,t){n(e).forEach((function(n){if(!t.db.objectStoreNames.contains(n)){he(t,n,e[n].primKey,e[n].indexes)}}))}function ve(e,n){for(var t=0;t<n.db.objectStoreNames.length;++t){var r=n.db.objectStoreNames[t];if(e[r]==null){n.db.deleteObjectStore(r)}}}function pe(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}this._allTables=O;this._createTransaction=function(e,n,t,r){return new xe(e,n,t,r)};function ye(e,n,t){if(!N&&!Ke.letThrough){if(!F){if(!h)return xn(new $.DatabaseClosed);V.open()["catch"](te)}return L.then((function(){return ye(e,n,t)}))}else{var r=V._createTransaction(e,n,g);try{r.create()}catch(e){return xn(e)}return r._promise(e,(function(e,n){return cn((function(){Ke.trans=r;return t(e,n,r)}))})).then((function(e){return r._completion.then((function(){return e}))}))}}this._whenReady=function(e){return N||Ke.letThrough?e():new Me((function(e,n){if(!F){if(!h){n(new $.DatabaseClosed);return}V.open()["catch"](te)}L.then(e,n)})).then(e)};this.verno=0;this.open=function(){if(F||D)return L.then((function(){return C?xn(C):V}));B&&(Q._stackHolder=q());F=true;C=null;N=false;var n=z,t=null;return Me.race([Q,new Me((function(n,r){if(!d)throw new $.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL "+"(not locally). If using old Safari versions, make sure to include indexedDB polyfill.");var i=X?d.open(e):d.open(e,Math.round(V.verno*10));if(!i)throw new $.MissingAPI("IndexedDB API not available");i.onerror=Un(r);i.onblocked=nn(ze);i.onupgradeneeded=nn((function(n){t=i.transaction;if(X&&!V._allowEmptyDB){i.onerror=zn;t.abort();i.result.close();var o=d.deleteDatabase(e);o.onsuccess=o.onerror=nn((function(){r(new $.NoSuchDatabase("Database "+e+" doesnt exist"))}))}else{t.onerror=Un(r);var u=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;oe(u/10,t,r,i)}}),r);i.onsuccess=nn((function(){t=null;D=i.result;Dn.push(V);if(X)He();else if(D.objectStoreNames.length>0){try{Ve(g,D.transaction(Gn(D.objectStoreNames),R))}catch(e){}}D.onversionchange=nn((function(e){V._vcFired=true;V.on("versionchange").fire(e)}));if(!Y&&e!=="__dbnames"){Fn.dbnames.put({name:e})["catch"](te)}n()}),r)}))]).then((function(){M=[];return Me.resolve(Mn.vip(V.on.ready.fire)).then((function e(){if(M.length>0){var n=M.reduce(fe,te);M=[];return Me.resolve(Mn.vip(n)).then(e)}}))}))["finally"]((function(){M=null})).then((function(){F=false;return V}))["catch"]((function(e){try{t&&t.abort()}catch(e){}F=false;V.close();C=e;return xn(C)}))["finally"]((function(){N=true;n()}))};this.close=function(){var e=Dn.indexOf(V);if(e>=0)Dn.splice(e,1);if(D){try{D.close()}catch(e){}D=null}h=false;C=new $.DatabaseClosed;if(F)W(C);L=new Me((function(e){z=e}));Q=new Me((function(e,n){W=n}))};this["delete"]=function(){var n=arguments.length>0;return new Me((function(t,r){if(n)throw new $.InvalidArgument("Arguments not allowed in db.delete()");if(F){L.then(i)}else{i()}function i(){V.close();var n=d.deleteDatabase(e);n.onsuccess=nn((function(){if(!Y){Fn.dbnames["delete"](e)["catch"](te)}t()}));n.onerror=Un(r);n.onblocked=ze}}))};this.backendDB=function(){return D};this.isOpen=function(){return D!==null};this.hasBeenClosed=function(){return C&&C instanceof $.DatabaseClosed};this.hasFailed=function(){return C!==null};this.dynamicallyOpened=function(){return X};this.name=e;s(this,{tables:{get:function e(){return n(O).map((function(e){return O[e]}))}}});this.on=Pn(this,"populate","blocked","versionchange",{ready:[fe,te]});this.on.ready.subscribe=y(this.on.ready.subscribe,(function(e){return function(n,t){Mn.vip((function(){if(N){if(!C)Me.resolve().then(n);if(t)e(n)}else if(M){M.push(n);if(t)e(n)}else{e(n);if(!t)e((function e(){V.on.ready.unsubscribe(n);V.on.ready.unsubscribe(e)}))}}))}}));this.transaction=function(){var e=me.apply(this,arguments);return this._transaction.apply(this,e)};function me(e,n,t){var r=arguments.length;if(r<2)throw new $.InvalidArgument("Too few arguments");var i=new Array(r-1);while(--r){i[r-1]=arguments[r]}t=i.pop();var o=S(i);return[e,o,t]}this._transaction=function(e,n,t){var r=Ke.trans;if(!r||r.db!==V||e.indexOf("!")!==-1)r=null;var i=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{var o=n.map((function(e){var n=e instanceof ge?e.name:e;if(typeof n!=="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return n}));if(e=="r"||e==R)e=R;else if(e=="rw"||e==H)e=H;else throw new $.InvalidArgument("Invalid transaction mode: "+e);if(r){if(r.mode===R&&e===H){if(i){r=null}else throw new $.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY")}if(r){o.forEach((function(e){if(r&&r.storeNames.indexOf(e)===-1){if(i){r=null}else throw new $.SubTransaction("Table "+e+" not included in parent transaction.")}}))}if(i&&r&&!r.active){r=null}}}catch(e){return r?r._promise(null,(function(n,t){t(e)})):xn(e)}return r?r._promise(e,u,"lock"):Ke.trans?mn(Ke.transless,(function(){return V._whenReady(u)})):V._whenReady(u);function u(){return Me.resolve().then((function(){var n=Ke.transless||Ke;var i=V._createTransaction(e,o,g,r);var u={trans:i,transless:n};if(r){i.idbtrans=r.idbtrans}else{i.create()}if(t.constructor===_e){fn()}var a;var s=Me.follow((function(){a=t.call(i,i);if(a){if(a.constructor===we){var e=ln.bind(null,null);a.then(e,e)}else if(typeof a.next==="function"&&typeof a["throw"]==="function"){a=Ln(a)}}}),u);return(a&&typeof a.then==="function"?Me.resolve(a).then((function(e){return i.active?e:xn(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):s.then((function(){return a}))).then((function(e){if(r)i._resolve();return i._completion.then((function(){return e}))}))["catch"]((function(e){i._reject(e);return xn(e)}))}))}};this.table=function(e){if(!a(O,e)){throw new $.InvalidTable("Table "+e+" does not exist")}return O[e]};function ge(e,n,t){this.name=e;this.schema=n;this._tx=t;this.hook=O[e]?O[e].hook:Pn(null,{creating:[ue,te],reading:[ie,re],updating:[se,te],deleting:[ae,te]})}function be(e,n,t){return(t?Vn:Un)((function(t){e.push(t);n&&n()}))}function ke(e,n,t,r,i){return new Me((function(o,u){var a=t.length,s=a-1;if(a===0)return o();if(!r){for(var c=0;c<a;++c){var f=e["delete"](t[c]);f.onerror=Un(u);if(c===s)f.onsuccess=nn((function(){return o()}))}}else{var l,h=Vn(u),d=Rn(null);_((function(){for(var r=0;r<a;++r){l={onsuccess:null,onerror:null};var u=t[r];i.call(l,u[0],u[1],n);var c=e["delete"](u[0]);c._hookCtx=l;c.onerror=h;if(r===s)c.onsuccess=Rn(o);else c.onsuccess=d}}),(function(e){l.onerror&&l.onerror(e);throw e}))}}))}s(ge.prototype,{_trans:function e(n,t,r){var i=this._tx||Ke.trans;return i&&i.db===V?i===Ke.trans?i._promise(n,t,r):cn((function(){return i._promise(n,t,r)}),{trans:i,transless:Ke.transless||Ke}):ye(n,[this.name],t)},_idbstore:function e(n,t,r){var i=this.name;function o(e,n,r){if(r.storeNames.indexOf(i)===-1)throw new $.NotFound("Table"+i+" not part of transaction");return t(e,n,r.idbtrans.objectStore(i),r)}return this._trans(n,o,r)},get:function e(n,t){if(n&&n.constructor===Object)return this.where(n).first(t);var r=this;return this._idbstore(R,(function(e,t,i){var o=i.get(n);o.onerror=Un(t);o.onsuccess=nn((function(){e(r.hook.reading.fire(o.result))}),t)})).then(t)},where:function e(r){if(typeof r==="string")return new Pe(this,r);if(t(r))return new Pe(this,"["+r.join("+")+"]");var i=n(r);if(i.length===1)return this.where(i[0]).equals(r[i[0]]);var o=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&i.every((function(n){return e.keyPath.indexOf(n)>=0}))&&e.keyPath.every((function(e){return i.indexOf(e)>=0}))}))[0];if(o&&Sn!==En)return this.where(o.name).equals(o.keyPath.map((function(e){return r[e]})));if(!o)console.warn("The query "+JSON.stringify(r)+" on "+this.name+" would benefit of a "+("compound index ["+i.join("+")+"]"));var u=this.schema.idxByName;var a=i.reduce((function(e,n){return[e[0]||u[n],e[0]||!u[n]?Ue(e[1],(function(e){return""+k(e,n)==""+r[n]})):e[1]]}),[null,null]);var s=a[0];return s?this.where(s.name).equals(r[s.keyPath]).filter(a[1]):o?this.filter(a[1]):this.where(i).equals("")},count:function e(n){return this.toCollection().count(n)},offset:function e(n){return this.toCollection().offset(n)},limit:function e(n){return this.toCollection().limit(n)},reverse:function e(){return this.toCollection().reverse()},filter:function e(n){return this.toCollection().and(n)},each:function e(n){return this.toCollection().each(n)},toArray:function e(n){return this.toCollection().toArray(n)},orderBy:function e(n){return new je(new Pe(this,t(n)?"["+n.join("+")+"]":n))},toCollection:function e(){return new je(new Pe(this))},mapToClass:function e(n,t){this.schema.mappedClass=n;var r=Object.create(n.prototype);if(t){qn(r,t)}this.schema.instanceTemplate=r;var i=function e(t){if(!t)return t;var r=Object.create(n.prototype);for(var i in t){if(a(t,i))try{r[i]=t[i]}catch(e){}}return r};if(this.schema.readHook){this.hook.reading.unsubscribe(this.schema.readHook)}this.schema.readHook=i;this.hook("reading",i);return n},defineClass:function e(n){return this.mapToClass(Mn.defineClass(n),n)},bulkDelete:function e(n){if(this.hook.deleting.fire===te){return this._idbstore(H,(function(e,t,r,i){e(ke(r,i,n,false,te))}))}else{return this.where(":id").anyOf(n)["delete"]().then((function(){}))}},bulkPut:function e(n,t){var r=this;return this._idbstore(H,(function(e,i,o){if(!o.keyPath&&!r.schema.primKey.auto&&!t)throw new $.InvalidArgument("bulkPut() with non-inbound keys requires keys array in second argument");if(o.keyPath&&t)throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(t&&t.length!==n.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");if(n.length===0)return e();var u=function n(t){if(s.length===0)e(t);else i(new J(r.name+".bulkPut(): "+s.length+" of "+f+" operations failed",s))};var a,s=[],c,f=n.length,l=r;if(r.hook.creating.fire===te&&r.hook.updating.fire===te){c=be(s);for(var h=0,d=n.length;h<d;++h){a=t?o.put(n[h],t[h]):o.put(n[h]);a.onerror=c}a.onerror=be(s,u);a.onsuccess=Hn(u)}else{var v=t||o.keyPath&&n.map((function(e){return k(e,o.keyPath)}));var p=v&&b(v,(function(e,t){return e!=null&&[e,n[t]]}));var y=!v?l.bulkAdd(n):l.where(":id").anyOf(v.filter((function(e){return e!=null}))).modify((function(){this.value=p[this.primKey];p[this.primKey]=null}))["catch"](G,(function(e){s=e.failures})).then((function(){var e=[],r=t&&[];for(var i=v.length-1;i>=0;--i){var o=v[i];if(o==null||p[o]){e.push(n[i]);t&&r.push(o);if(o!=null)p[o]=null}}e.reverse();t&&r.reverse();return l.bulkAdd(e,r)})).then((function(e){var n=v[v.length-1];return n!=null?n:e}));y.then(u)["catch"](J,(function(e){s=s.concat(e.failures);u()}))["catch"](i)}}),"locked")},bulkAdd:function e(n,t){var r=this,i=this.hook.creating.fire;return this._idbstore(H,(function(e,o,u,a){if(!u.keyPath&&!r.schema.primKey.auto&&!t)throw new $.InvalidArgument("bulkAdd() with non-inbound keys requires keys array in second argument");if(u.keyPath&&t)throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(t&&t.length!==n.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");if(n.length===0)return e();function s(n){if(f.length===0)e(n);else o(new J(r.name+".bulkAdd(): "+f.length+" of "+d+" operations failed",f))}var c,f=[],l,h,d=n.length;if(i!==te){var v=u.keyPath,p;l=be(f,null,true);h=Rn(null);_((function(){for(var e=0,r=n.length;e<r;++e){p={onerror:null,onsuccess:null};var o=t&&t[e];var s=n[e],f=t?o:v?k(s,v):undefined,d=i.call(p,f,s,a);if(f==null&&d!=null){if(v){s=A(s);x(s,v,d)}else{o=d}}c=o!=null?u.add(s,o):u.add(s);c._hookCtx=p;if(e<r-1){c.onerror=l;if(p.onsuccess)c.onsuccess=h}}}),(function(e){p.onerror&&p.onerror(e);throw e}));c.onerror=be(f,s,true);c.onsuccess=Rn(s)}else{l=be(f);for(var y=0,m=n.length;y<m;++y){c=t?u.add(n[y],t[y]):u.add(n[y]);c.onerror=l}c.onerror=be(f,s);c.onsuccess=Hn(s)}}))},add:function e(n,t){var r=this.hook.creating.fire;return this._idbstore(H,(function(e,i,o,u){var a={onsuccess:null,onerror:null};if(r!==te){var s=t!=null?t:o.keyPath?k(n,o.keyPath):undefined;var c=r.call(a,s,n,u);if(s==null&&c!=null){if(o.keyPath)x(n,o.keyPath,c);else t=c}}try{var f=t!=null?o.add(n,t):o.add(n);f._hookCtx=a;f.onerror=Vn(i);f.onsuccess=Rn((function(t){var r=o.keyPath;if(r)x(n,r,t);e(t)}))}catch(e){if(a.onerror)a.onerror(e);throw e}}))},put:function e(n,t){var r=this;var i=this.hook.creating.fire,o=this.hook.updating.fire;if(i!==te||o!==te){var u=this.schema.primKey.keyPath;var a=t!==undefined?t:u&&k(n,u);if(a==null)return this.add(n);n=A(n);return this._trans(H,(function(){return r.where(":id").equals(a).modify((function(){this.value=n})).then((function(e){return e===0?r.add(n,t):a}))}),"locked")}else{return this._idbstore(H,(function(e,r,i){var o=t!==undefined?i.put(n,t):i.put(n);o.onerror=Un(r);o.onsuccess=nn((function(t){var r=i.keyPath;if(r)x(n,r,t.target.result);e(o.result)}))}))}},delete:function e(n){if(this.hook.deleting.subscribers.length){return this.where(":id").equals(n)["delete"]()}else{return this._idbstore(H,(function(e,t,r){var i=r["delete"](n);i.onerror=Un(t);i.onsuccess=nn((function(){e(i.result)}))}))}},clear:function e(){if(this.hook.deleting.subscribers.length){return this.toCollection()["delete"]()}else{return this._idbstore(H,(function(e,n,t){var r=t.clear();r.onerror=Un(n);r.onsuccess=nn((function(){e(r.result)}))}))}},update:function e(r,i){if(babelHelpers["typeof"](i)!=="object"||t(i))throw new $.InvalidArgument("Modifications must be an object.");if(babelHelpers["typeof"](r)==="object"&&!t(r)){n(i).forEach((function(e){x(r,e,i[e])}));var o=k(r,this.schema.primKey.keyPath);if(o===undefined)return xn(new $.InvalidArgument("Given object does not contain its primary key"));return this.where(":id").equals(o).modify(i)}else{return this.where(":id").equals(r).modify(i)}}});function xe(e,n,t,r){var i=this;this.db=V;this.mode=e;this.storeNames=n;this.idbtrans=null;this.on=Pn(this,"complete","error","abort");this.parent=r||null;this.active=true;this._reculock=0;this._blockedFuncs=[];this._resolve=null;this._reject=null;this._waitingFor=null;this._waitingQueue=null;this._spinCount=0;this._completion=new Me((function(e,n){i._resolve=e;i._reject=n}));this._completion.then((function(){i.active=false;i.on.complete.fire()}),(function(e){var n=i.active;i.active=false;i.on.error.fire(e);i.parent?i.parent._reject(e):n&&i.idbtrans&&i.idbtrans.abort();return xn(e)}))}s(xe.prototype,{_lock:function e(){m(!Ke.global);++this._reculock;if(this._reculock===1&&!Ke.global)Ke.lockOwnerFor=this;return this},_unlock:function e(){m(!Ke.global);if(--this._reculock===0){if(!Ke.global)Ke.lockOwnerFor=null;while(this._blockedFuncs.length>0&&!this._locked()){var n=this._blockedFuncs.shift();try{mn(n[1],n[0])}catch(e){}}}return this},_locked:function e(){return this._reculock&&Ke.lockOwnerFor!==this},create:function e(n){var t=this;if(!this.mode)return this;m(!this.idbtrans);if(!n&&!D){switch(C&&C.name){case"DatabaseClosedError":throw new $.DatabaseClosed(C);case"MissingAPIError":throw new $.MissingAPI(C.message,C);default:throw new $.OpenFailed(C)}}if(!this.active)throw new $.TransactionInactive;m(this._completion._state===null);n=this.idbtrans=n||D.transaction(Gn(this.storeNames),this.mode);n.onerror=nn((function(e){zn(e);t._reject(n.error)}));n.onabort=nn((function(e){zn(e);t.active&&t._reject(new $.Abort(n.error));t.active=false;t.on("abort").fire(e)}));n.oncomplete=nn((function(){t.active=false;t._resolve()}));return this},_promise:function e(n,t,r){var i=this;if(n===H&&this.mode!==H)return xn(new $.ReadOnly("Transaction is readonly"));if(!this.active)return xn(new $.TransactionInactive);if(this._locked()){return new Me((function(e,o){i._blockedFuncs.push([function(){i._promise(n,t,r).then(e,o)},Ke])}))}else if(r){return cn((function(){var e=new Me((function(e,n){i._lock();var r=t(e,n,i);if(r&&r.then)r.then(e,n)}));e["finally"]((function(){return i._unlock()}));e._lib=true;return e}))}else{var o=new Me((function(e,n){var r=t(e,n,i);if(r&&r.then)r.then(e,n)}));o._lib=true;return o}},_root:function e(){return this.parent?this.parent._root():this},waitFor:function e(n){var t=this._root();n=Me.resolve(n);if(t._waitingFor){t._waitingFor=t._waitingFor.then((function(){return n}))}else{t._waitingFor=n;t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);(function e(){++t._spinCount;while(t._waitingQueue.length){t._waitingQueue.shift()()}if(t._waitingFor)r.get(-Infinity).onsuccess=e})()}var i=t._waitingFor;return new Me((function(e,r){n.then((function(n){return t._waitingQueue.push(nn(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(nn(r.bind(null,e)))}))["finally"]((function(){if(t._waitingFor===i){t._waitingFor=null}}))}))},abort:function e(){this.active&&this._reject(new $.Abort);this.active=false},tables:{get:U("Transaction.tables",(function(){return O}))},table:function e(n){var e=V.table(n);return new ge(n,e.schema,this)}});function Pe(e,n,t){this._ctx={table:e,index:n===":id"?null:n,or:t}}s(Pe.prototype,(function(){function e(e,n,t){var r=e instanceof Pe?new je(e):e;r._ctx.error=t?new t(n):new TypeError(n);return r}function n(e){return new je(e,(function(){return v.only("")})).limit(0)}function t(e){return e==="next"?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function r(e){return e==="next"?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function i(e,n,t,r,i,o){var u=Math.min(e.length,r.length);var a=-1;for(var s=0;s<u;++s){var c=n[s];if(c!==r[s]){if(i(e[s],t[s])<0)return e.substr(0,s)+t[s]+t.substr(s+1);if(i(e[s],r[s])<0)return e.substr(0,s)+r[s]+t.substr(s+1);if(a>=0)return e.substr(0,a)+n[a]+t.substr(a+1);return null}if(i(e[s],c)<0)a=s}if(u<r.length&&o==="next")return e+t.substr(e.length);if(u<e.length&&o==="prev")return e.substr(0,t.length);return a<0?null:e.substr(0,a)+r[a]+t.substr(a+1)}function o(n,o,u,a){var s,c,f,l,h,d,p,y=u.length;if(!u.every((function(e){return typeof e==="string"}))){return e(n,In)}function m(e){s=t(e);c=r(e);f=e==="next"?qe:Re;var n=u.map((function(e){return{lower:c(e),upper:s(e)}})).sort((function(e,n){return f(e.lower,n.lower)}));l=n.map((function(e){return e.upper}));h=n.map((function(e){return e.lower}));d=e;p=e==="next"?"":a}m("next");var g=new je(n,(function(){return v.bound(l[0],h[y-1]+a)}));g._ondirectionchange=function(e){m(e)};var b=0;g._addAlgorithm((function(e,n,t){var r=e.key;if(typeof r!=="string")return false;var u=c(r);if(o(u,h,b)){return true}else{var a=null;for(var s=b;s<y;++s){var v=i(r,u,l[s],h[s],f,d);if(v===null&&a===null)b=s+1;else if(a===null||f(a,v)>0){a=v}}if(a!==null){n((function(){e["continue"](a+p)}))}else{n(t)}return false}}));return g}return{between:function t(r,i,o,u){o=o!==false;u=u===true;try{if(Ce(r,i)>0||Ce(r,i)===0&&(o||u)&&!(o&&u))return n(this);return new je(this,(function(){return v.bound(r,i,!o,!u)}))}catch(n){return e(this,An)}},equals:function e(n){return new je(this,(function(){return v.only(n)}))},above:function e(n){return new je(this,(function(){return v.lowerBound(n,true)}))},aboveOrEqual:function e(n){return new je(this,(function(){return v.lowerBound(n)}))},below:function e(n){return new je(this,(function(){return v.upperBound(n,true)}))},belowOrEqual:function e(n){return new je(this,(function(){return v.upperBound(n)}))},startsWith:function n(t){if(typeof t!=="string")return e(this,In);return this.between(t,t+En,true,true)},startsWithIgnoreCase:function e(n){if(n==="")return this.startsWith(n);return o(this,(function(e,n){return e.indexOf(n[0])===0}),[n],En)},equalsIgnoreCase:function e(n){return o(this,(function(e,n){return e===n[0]}),[n],"")},anyOfIgnoreCase:function e(){var t=T.apply(K,arguments);if(t.length===0)return n(this);return o(this,(function(e,n){return n.indexOf(e)!==-1}),t,"")},startsWithAnyOfIgnoreCase:function e(){var t=T.apply(K,arguments);if(t.length===0)return n(this);return o(this,(function(e,n){return n.some((function(n){return e.indexOf(n)===0}))}),t,En)},anyOf:function t(){var r=T.apply(K,arguments);var i=Fe;try{r.sort(i)}catch(n){return e(this,An)}if(r.length===0)return n(this);var o=new je(this,(function(){return v.bound(r[0],r[r.length-1])}));o._ondirectionchange=function(e){i=e==="next"?Fe:Ne;r.sort(i)};var u=0;o._addAlgorithm((function(e,n,t){var o=e.key;while(i(o,r[u])>0){++u;if(u===r.length){n(t);return false}}if(i(o,r[u])===0){return true}else{n((function(){e["continue"](r[u])}));return false}}));return o},notEqual:function e(n){return this.inAnyRange([[On,n],[n,Sn]],{includeLowers:false,includeUppers:false})},noneOf:function n(){var t=T.apply(K,arguments);if(t.length===0)return new je(this);try{t.sort(Fe)}catch(n){return e(this,An)}var r=t.reduce((function(e,n){return e?e.concat([[e[e.length-1][1],n]]):[[On,n]]}),null);r.push([t[t.length-1],Sn]);return this.inAnyRange(r,{includeLowers:false,includeUppers:false})},inAnyRange:function t(r,i){if(r.length===0)return n(this);if(!r.every((function(e){return e[0]!==undefined&&e[1]!==undefined&&Fe(e[0],e[1])<=0}))){return e(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",$.InvalidArgument)}var o=!i||i.includeLowers!==false;var u=i&&i.includeUppers===true;function a(e,n){for(var t=0,r=e.length;t<r;++t){var i=e[t];if(Ce(n[0],i[1])<0&&Ce(n[1],i[0])>0){i[0]=Te(i[0],n[0]);i[1]=Be(i[1],n[1]);break}}if(t===r)e.push(n);return e}var s=Fe;function c(e,n){return s(e[0],n[0])}var f;try{f=r.reduce(a,[]);f.sort(c)}catch(n){return e(this,An)}var l=0;var h=u?function(e){return Fe(e,f[l][1])>0}:function(e){return Fe(e,f[l][1])>=0};var d=o?function(e){return Ne(e,f[l][0])>0}:function(e){return Ne(e,f[l][0])>=0};function p(e){return!h(e)&&!d(e)}var y=h;var m=new je(this,(function(){return v.bound(f[0][0],f[f.length-1][1],!o,!u)}));m._ondirectionchange=function(e){if(e==="next"){y=h;s=Fe}else{y=d;s=Ne}f.sort(c)};m._addAlgorithm((function(e,n,t){var r=e.key;while(y(r)){++l;if(l===f.length){n(t);return false}}if(p(r)){return true}else if(Ce(r,f[l][1])===0||Ce(r,f[l][0])===0){return false}else{n((function(){if(s===Fe)e["continue"](f[l][0]);else e["continue"](f[l][1])}));return false}}));return m},startsWithAnyOf:function t(){var r=T.apply(K,arguments);if(!r.every((function(e){return typeof e==="string"}))){return e(this,"startsWithAnyOf() only works with strings")}if(r.length===0)return n(this);return this.inAnyRange(r.map((function(e){return[e,e+En]})))}}}));function je(e,n){var t=null,r=null;if(n)try{t=n()}catch(e){r=e}var i=e._ctx,o=i.table;this._ctx={table:o,index:i.index,isPrimKey:!i.index||o.schema.primKey.keyPath&&i.index===o.schema.primKey.name,range:t,keysOnly:false,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:true,isMatch:null,offset:0,limit:Infinity,error:r,or:i.or,valueMapper:o.hook.reading.fire}}function Ee(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}s(je.prototype,(function(){function e(e,n){e.filter=Ue(e.filter,n)}function t(e,n,t){var r=e.replayFilter;e.replayFilter=r?function(){return Ue(r(),n())}:n;e.justLimit=t&&!r}function r(e,n){e.isMatch=Ue(e.isMatch,n)}function o(e,n){if(e.isPrimKey)return n;var t=e.table.schema.idxByName[e.index];if(!t)throw new $.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return n.index(t.name)}function u(e,n){var t=o(e,n);return e.keysOnly&&"openKeyCursor"in t?t.openKeyCursor(e.range||null,e.dir+e.unique):t.openCursor(e.range||null,e.dir+e.unique)}function s(e,n,t,r,i){var o=e.replayFilter?Ue(e.filter,e.replayFilter()):e.filter;if(!e.or){Ie(u(e,i),Ue(e.algorithm,o),n,t,r,!e.keysOnly&&e.valueMapper)}else(function(){var s={};var c=0;function f(){if(++c===2)t()}function l(e,t,i){if(!o||o(t,i,f,r)){var u=t.primaryKey;var c=""+u;if(c==="[object ArrayBuffer]")c=""+new Uint8Array(u);if(!a(s,c)){s[c]=true;n(e,t,i)}}}e.or._iterate(l,f,r,i);Ie(u(e,i),e.algorithm,l,f,r,!e.keysOnly&&e.valueMapper)})()}return{_read:function e(n,t){var r=this._ctx;return r.error?r.table._trans(null,xn.bind(null,r.error)):r.table._idbstore(R,n).then(t)},_write:function e(n){var t=this._ctx;return t.error?t.table._trans(null,xn.bind(null,t.error)):t.table._idbstore(H,n,"locked")},_addAlgorithm:function e(n){var t=this._ctx;t.algorithm=Ue(t.algorithm,n)},_iterate:function e(n,t,r,i){return s(this._ctx,n,t,r,i)},clone:function e(n){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);if(n)i(r,n);t._ctx=r;return t},raw:function e(){this._ctx.valueMapper=null;return this},each:function e(n){var t=this._ctx;return this._read((function(e,r,i){s(t,n,e,r,i)}))},count:function e(n){var t=this._ctx;if(Ee(t,true)){return this._read((function(e,n,r){var i=o(t,r);var u=t.range?i.count(t.range):i.count();u.onerror=Un(n);u.onsuccess=function(n){e(Math.min(n.target.result,t.limit))}}),n)}else{var e=0;return this._read((function(n,r,i){s(t,(function(){++e;return false}),(function(){n(e)}),r,i)}),n)}},sortBy:function e(n,t){var r=n.split(".").reverse(),i=r[0],o=r.length-1;function u(e,n){if(n)return u(e[r[n]],n-1);return e[i]}var a=this._ctx.dir==="next"?1:-1;function s(e,n){var t=u(e,o),r=u(n,o);return t<r?-a:t>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},toArray:function e(n){var t=this._ctx;return this._read((function(e,n,r){if(Z&&t.dir==="next"&&Ee(t,true)&&t.limit>0){var i=t.table.hook.reading.fire;var u=o(t,r);var a=t.limit<Infinity?u.getAll(t.range,t.limit):u.getAll(t.range);a.onerror=Un(n);a.onsuccess=i===re?Hn(e):Hn((function(t){try{e(t.map(i))}catch(e){n(e)}}))}else{var c=[];s(t,(function(e){c.push(e)}),(function n(){e(c)}),n,r)}}),n)},offset:function e(n){var r=this._ctx;if(n<=0)return this;r.offset+=n;if(Ee(r)){t(r,(function(){var e=n;return function(n,t){if(e===0)return true;if(e===1){--e;return false}t((function(){n.advance(e);e=0}));return false}}))}else{t(r,(function(){var e=n;return function(){return--e<0}}))}return this},limit:function e(n){this._ctx.limit=Math.min(this._ctx.limit,n);t(this._ctx,(function(){var e=n;return function(n,t,r){if(--e<=0)t(r);return e>=0}}),true);return this},until:function n(t,r){e(this._ctx,(function(e,n,i){if(t(e.value)){n(i);return r}else{return true}}));return this},first:function e(n){return this.limit(1).toArray((function(e){return e[0]})).then(n)},last:function e(n){return this.reverse().first(n)},filter:function n(t){e(this._ctx,(function(e){return t(e.value)}));r(this._ctx,t);return this},and:function e(n){return this.filter(n)},or:function e(n){return new Pe(this._ctx.table,n,this)},reverse:function e(){this._ctx.dir=this._ctx.dir==="prev"?"next":"prev";if(this._ondirectionchange)this._ondirectionchange(this._ctx.dir);return this},desc:function e(){return this.reverse()},eachKey:function e(n){var t=this._ctx;t.keysOnly=!t.isMatch;return this.each((function(e,t){n(t.key,t)}))},eachUniqueKey:function e(n){this._ctx.unique="unique";return this.eachKey(n)},eachPrimaryKey:function e(n){var t=this._ctx;t.keysOnly=!t.isMatch;return this.each((function(e,t){n(t.primaryKey,t)}))},keys:function e(n){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,n){r.push(n.key)})).then((function(){return r})).then(n)},primaryKeys:function e(n){var t=this._ctx;if(Z&&t.dir==="next"&&Ee(t,true)&&t.limit>0){return this._read((function(e,n,r){var i=o(t,r);var u=t.limit<Infinity?i.getAllKeys(t.range,t.limit):i.getAllKeys(t.range);u.onerror=Un(n);u.onsuccess=Hn(e)})).then(n)}t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,n){r.push(n.primaryKey)})).then((function(){return r})).then(n)},uniqueKeys:function e(n){this._ctx.unique="unique";return this.keys(n)},firstKey:function e(n){return this.limit(1).keys((function(e){return e[0]})).then(n)},lastKey:function e(n){return this.reverse().firstKey(n)},distinct:function n(){var t=this._ctx,r=t.index&&t.table.schema.idxByName[t.index];if(!r||!r.multi)return this;var i={};e(this._ctx,(function(e){var n=e.primaryKey.toString();var t=a(i,n);i[n]=true;return!t}));return this},modify:function e(t){var r=this,o=this._ctx,u=o.table.hook,s=u.updating.fire,c=u.deleting.fire;return this._write((function(e,o,u,f){var l;if(typeof t==="function"){if(s===te&&c===te){l=t}else{l=function e(r){var i=A(r);if(t.call(this,r,this)===false)return false;if(!a(this,"value")){c.call(this,this.primKey,r,f)}else{var o=I(i,this.value);var u=s.call(this,o,this.primKey,i,f);if(u){r=this.value;n(u).forEach((function(e){x(r,e,u[e])}))}}}}}else if(s===te){var h=n(t);var d=h.length;l=function e(n){var r=false;for(var i=0;i<d;++i){var o=h[i],u=t[o];if(k(n,o)!==u){x(n,o,u);r=true}}return r}}else{var v=t;t=j(v);l=function e(r){var o=false;var u=s.call(this,t,this.primKey,A(r),f);if(u)i(t,u);n(t).forEach((function(e){var n=t[e];if(k(r,e)!==n){x(r,e,n);o=true}}));if(u)t=j(v);return o}}var p=0;var y=0;var m=false;var g=[];var b=[];var w=null;function P(e,n){w=n.primaryKey;var t={primKey:n.primaryKey,value:e,onsuccess:null,onerror:null};function r(e){g.push(e);b.push(t.primKey);S();return true}if(l.call(t,e,t)!==false){var i=!a(t,"value");++p;_((function(){var e=i?n["delete"]():n.update(t.value);e._hookCtx=t;e.onerror=Vn(r);e.onsuccess=Rn((function(){++y;S()}))}),r)}else if(t.onsuccess){t.onsuccess(t.value)}}function E(e){if(e){g.push(e);b.push(w)}return o(new G("Error modifying one or more objects",g,y,b))}function S(){if(m&&y+g.length===p){if(g.length>0)E();else e(y)}}r.clone().raw()._iterate(P,(function(){m=true;S()}),E,u)}))},delete:function e(){var n=this;var t=this._ctx,r=t.range,i=t.table.hook.deleting.fire,o=i!==te;if(!o&&Ee(t)&&(t.isPrimKey&&!Tn||!r)){return this._write((function(e,n,t){var i=Un(n),o=r?t.count(r):t.count();o.onerror=i;o.onsuccess=function(){var u=o.result;_((function(){var n=r?t["delete"](r):t.clear();n.onerror=i;n.onsuccess=function(){return e(u)}}),(function(e){return n(e)}))}}))}var u=o?2e3:1e4;return this._write((function(e,r,a,s){var c=0;var f=n.clone({keysOnly:!t.isMatch&&!o}).distinct().limit(u).raw();var l=[];var h=function e(){return f.each(o?function(e,n){l.push([n.primaryKey,n.value])}:function(e,n){l.push(n.primaryKey)}).then((function(){o?l.sort((function(e,n){return Fe(e[0],n[0])})):l.sort(Fe);return ke(a,s,l,o,i)})).then((function(){var n=l.length;c+=n;l=[];return n<u?c:e()}))};e(h())}))}}}));function Se(e,n){return e._cfg.version-n._cfg.version}function Oe(e,n,t){n.forEach((function(n){var r=t[n];e.forEach((function(e){if(!(n in e)){if(e===xe.prototype||e instanceof xe){f(e,n,{get:function e(){return this.table(n)}})}else{e[n]=new ge(n,r)}}}))}))}function Ae(e){e.forEach((function(e){for(var n in e){if(e[n]instanceof ge)delete e[n]}}))}function Ie(e,n,t,r,i,o){var u=o?function(e,n,r){return t(o(e),n,r)}:t;var a=nn(u,i);if(!e.onerror)e.onerror=Un(i);if(n){e.onsuccess=w((function t(){var o=e.result;if(o){var u=function e(){o["continue"]()};if(n(o,(function(e){u=e}),r,i))a(o.value,o,(function(e){u=e}));u()}else{r()}}),i)}else{e.onsuccess=w((function n(){var t=e.result;if(t){var i=function e(){t["continue"]()};a(t.value,t,(function(e){i=e}));i()}else{r()}}),i)}}function De(e){var n=[];e.split(",").forEach((function(e){e=e.trim();var r=e.replace(/([&*]|\+\+)/g,"");var i=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;n.push(new Wn(r,i||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),t(i),/\./.test(e)))}));return n}function Ce(e,n){return d.cmp(e,n)}function Te(e,n){return Ce(e,n)<0?e:n}function Be(e,n){return Ce(e,n)>0?e:n}function Fe(e,n){return d.cmp(e,n)}function Ne(e,n){return d.cmp(n,e)}function qe(e,n){return e<n?-1:e===n?0:1}function Re(e,n){return e>n?-1:e===n?0:1}function Ue(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}function He(){V.verno=D.version/10;V._dbSchema=g={};E=p(D.objectStoreNames,0);if(E.length===0)return;var e=D.transaction(Gn(E),"readonly");E.forEach((function(n){var t=e.objectStore(n),r=t.keyPath,i=r&&typeof r==="string"&&r.indexOf(".")!==-1;var o=new Wn(r,r||"",false,false,!!t.autoIncrement,r&&typeof r!=="string",i);var u=[];for(var a=0;a<t.indexNames.length;++a){var s=t.index(t.indexNames[a]);r=s.keyPath;i=r&&typeof r==="string"&&r.indexOf(".")!==-1;var c=new Wn(s.name,r,!!s.unique,!!s.multiEntry,false,r&&typeof r!=="string",i);u.push(c)}g[n]=new Qn(n,o,u,{})}));Oe([O],n(g),g)}function Ve(e,n){var t=n.db.objectStoreNames;for(var i=0;i<t.length;++i){var o=t[i];var u=n.objectStore(o);Z="getAll"in u;for(var a=0;a<u.indexNames.length;++a){var s=u.indexNames[a];var c=u.index(s).keyPath;var f=typeof c==="string"?c:"["+p(c).join("+")+"]";if(e[o]){var l=e[o].idxByName[f];if(l)l.name=s}}}if(/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&r.WorkerGlobalScope&&r instanceof r.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604){Z=false}}function ze(e){V.on("blocked").fire(e);Dn.filter((function(e){return e.name===V.name&&e!==V&&!e._vcFired})).map((function(n){return n.on("versionchange").fire(e)}))}i(this,{Collection:je,Table:ge,Transaction:xe,Version:ne,WhereClause:Pe});ee();l.forEach((function(e){e(V)}))}function Nn(e){if(typeof e==="function"){return new e}else if(t(e)){return[Nn(e[0])]}else if(e&&babelHelpers["typeof"](e)==="object"){var n={};qn(n,e);return n}else{return e}}function qn(e,t){n(t).forEach((function(n){var r=Nn(t[n]);e[n]=r}));return e}function Rn(e){return nn((function(n){var t=n.target,r=t._hookCtx,i=r.value||t.result,o=r&&r.onsuccess;o&&o(i);e&&e(i)}),e)}function Un(e){return nn((function(n){zn(n);e(n.target.error);return false}))}function Hn(e){return nn((function(n){e(n.target.result)}))}function Vn(e){return nn((function(n){var t=n.target,r=t.error,i=t._hookCtx,o=i&&i.onerror;o&&o(r);zn(n);e(r);return false}))}function zn(e){if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault()}function Ln(e){var n=function n(t){return e.next(t)},r=function n(t){return e["throw"](t)},i=u(n),o=u(r);function u(e){return function(n){var r=e(n),u=r.value;return r.done?u:!u||typeof u.then!=="function"?t(u)?Me.all(u).then(i,o):i(u):u.then(i,o)}}return u(n)()}function Wn(e,n,t,r,i,o,u){this.name=e;this.keyPath=n;this.unique=t;this.multi=r;this.auto=i;this.compound=o;this.dotted=u;var a=typeof n==="string"?n:n&&"["+[].join.call(n,"+")+"]";this.src=(t?"&":"")+(r?"*":"")+(i?"++":"")+a}function Qn(e,n,t,r){this.name=e;this.primKey=n||new Wn;this.indexes=t||[new Wn];this.instanceTemplate=r;this.mappedClass=null;this.idxByName=b(t,(function(e){return[e.name,e]}))}function Gn(e){return e.length===1?e[0]:e}function Jn(e){var n=e&&(e.getDatabaseNames||e.webkitGetDatabaseNames);return n&&n.bind(e)}s(Mn,ne);s(Mn,{delete:function e(n){var t=new Mn(n),r=t["delete"]();r.onblocked=function(e){t.on("blocked",e);return this};return r},exists:function e(n){return new Mn(n).open().then((function(e){e.close();return true}))["catch"](Mn.NoSuchDatabaseError,(function(){return false}))},getDatabaseNames:function e(n){var e=Jn(Mn.dependencies.indexedDB);return e?new Me((function(n,t){var r=e();r.onsuccess=function(e){n(p(e.target.result,0))};r.onerror=Un(t)})).then(n):Fn.dbnames.toCollection().primaryKeys(n)},defineClass:function e(){function n(e){if(e)i(this,e)}return n},applyStructure:qn,ignoreTransaction:function e(n){return Ke.trans?mn(Ke.transless,n):n()},vip:function e(n){return cn((function(){Ke.letThrough=true;return n()}))},async:function e(n){return function(){try{var e=Ln(n.apply(this,arguments));if(!e||typeof e.then!=="function")return Me.resolve(e);return e}catch(e){return xn(e)}}},spawn:function e(n,t,r){try{var i=Ln(n.apply(r,t||[]));if(!i||typeof i.then!=="function")return Me.resolve(i);return i}catch(e){return xn(e)}},currentTransaction:{get:function e(){return Ke.trans||null}},waitFor:function e(n,t){var r=Me.resolve(typeof n==="function"?Mn.ignoreTransaction(n):n).timeout(t||6e4);return Ke.trans?Ke.trans.waitFor(r):r},Promise:Me,debug:{get:function e(){return B},set:function e(n){F(n,n==="dexie"?function(){return true}:Bn)}},derive:l,extend:i,props:s,override:y,Events:Pn,getByKeyPath:k,setByKeyPath:x,delByKeyPath:P,shallowClone:j,deepClone:A,getObjectDiff:I,asap:g,maxKey:Sn,minKey:On,addons:[],connections:Dn,MultiModifyError:$.Modify,errnames:X,IndexSpec:Wn,TableSchema:Qn,dependencies:function(){try{return{indexedDB:r.indexedDB||r.mozIndexedDB||r.webkitIndexedDB||r.msIndexedDB,IDBKeyRange:r.IDBKeyRange||r.webkitIDBKeyRange}}catch(e){return{indexedDB:null,IDBKeyRange:null}}}(),semVer:jn,version:jn.split(".").map((function(e){return parseInt(e)})).reduce((function(e,n,t){return e+n/Math.pow(10,t*2)})),default:Mn,Dexie:Mn});Me.rejectionMapper=ee;Fn=new Mn("__dbnames");Fn.version(1).stores({dbnames:"name"});(function(){var e="Dexie.DatabaseNames";try{if((typeof localStorage==="undefined"?"undefined":babelHelpers["typeof"](localStorage))!==undefined&&r.document!==undefined){JSON.parse(localStorage.getItem(e)||"[]").forEach((function(e){return Fn.dbnames.put({name:e})["catch"](te)}));localStorage.removeItem(e)}}catch(e){}})();var Xn=function e(n){babelHelpers.classCallCheck(this,e);return new Mn(n)};Xn["delete"]=Mn["delete"];Xn.exists=Mn.exists;Xn.getDatabaseNames=Mn.getDatabaseNames;Xn.defineClass=Mn.defineClass;Xn.applyStructure=Mn.applyStructure;Xn.ignoreTransaction=Mn.ignoreTransaction;Xn.vip=Mn.vip;Xn.async=Mn.async;Xn.spawn=Mn.spawn;Xn.currentTransaction=Mn.currentTransaction;Xn.waitFor=Mn.waitFor;Xn.Promise=Mn.Promise;Xn.debug=Mn.debug;Xn.derive=Mn.derive;Xn.extend=Mn.extend;Xn.props=Mn.props;Xn.override=Mn.override;Xn.Events=Mn.Events;Xn.getByKeyPath=Mn.getByKeyPath;Xn.setByKeyPath=Mn.setByKeyPath;Xn.delByKeyPath=Mn.delByKeyPath;Xn.shallowClone=Mn.shallowClone;Xn.deepClone=Mn.deepClone;Xn.getObjectDiff=Mn.getObjectDiff;Xn.asap=Mn.asap;Xn.maxKey=Mn.maxKey;Xn.minKey=Mn.minKey;Xn.addons=Mn.addons;Xn.connections=Mn.connections;Xn.MultiModifyError=Mn.MultiModifyError;Xn.errnames=Mn.errnames;Xn.IndexSpec=Mn.IndexSpec;Xn.TableSchema=Mn.TableSchema;Xn.dependencies=Mn.dependencies;Xn.semVer=Mn.semVer;Xn.version=Mn.version;Xn["default"]=Mn["default"];Xn.Dexie=Mn.Dexie;e.Dexie=Xn})(this.BX=this.BX||{});
//# sourceMappingURL=dexie.bitrix.bundle.map.js